home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / Issue25 / compress / COMPRESS.ZIP / OBJS.ZIP / SELFXSML.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1997-05-16  |  1.7 KB  |  46 lines

  1. //---------------------------------------------------------------------------
  2. #include <vcl\vcl.h>
  3. #pragma hdrstop
  4.  
  5. /*
  6.   TCompress V3.0 "Tiny" self-extracting EXE example
  7.   This program uses the same approach (and doInstal unit) as
  8.   does the SELFEXTR.MAK program. Hence, refer to the instructions
  9.   at the top of SELFEXTF.PAS for setup instructions.
  10.  
  11.   Notes:
  12.   1) Because no form is involved, this program will be
  13.      far *smaller* than SELFEXTR.EXE. The downside is that
  14.      it has no user interaction, although you could use Windows
  15.      MessageBox calls to at least display a confirmation message.
  16.   2) In order to avoid having the Borland Database Engine linked in,
  17.      (which makes the resulting project much larger than it needs to be)
  18.      be sure to build your library with the COMPONLY.OBJ (renamed
  19.      in placed of COMPRESS.OBJ), per the instructions in COMPRESS.HLP).
  20. }
  21. */
  22. //---------------------------------------------------------------------------
  23. USERES("selfxsml.res");
  24. USERES("COMP_RES.res");
  25. USEUNIT("doinstal.pas"); // Code which actually does the TCompress work (in doInstal.pas)
  26. //---------------------------------------------------------------------------
  27. #include "doInstal.hpp" // do we can call the DoInstall procedure ok
  28.  
  29. #define PROG_NAME "notepad.exe"
  30. #define README_NAME "readme.txt"
  31.  
  32. //---------------------------------------------------------------------------
  33. WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
  34. {
  35.     try
  36.     {
  37.         DoInstall("",PROG_NAME, README_NAME); // into the CURRENT directory!
  38.     }
  39.     catch (Exception &exception)
  40.     {
  41.         Application->ShowException(&exception);
  42.     }
  43.     return 0;
  44. }
  45. //---------------------------------------------------------------------------
  46.